<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-type" name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="email=no">
<title>圣耀</title>
<link rel="stylesheet" href="../phone/css/base.css" />
<link rel="stylesheet" href="../phone/css/main.css" />
<script type="text/javascript" charset="utf-8" src="../phone/js/jquery.js"></script>
</head>

<body>

<!-- 预先加载按钮点击效果-->
<img src="../phone/images/snack_share_12.png" style="display:none;">
<!--end-->
<section class="share_4_box">
	<div class="share_4"></div>
    <div class="share_4_text" id="share_4_text">
    	<p>如果点击没有开始下载，请点击屏幕右上角图标，</p>
        <p>选择“在浏览器中打开”，下载APP。</p>
    </div>
    <div class="share_4_btn" onclick="down_load();">下载APP</div>
</section>
</body>
</html>
<script type="text/javascript" >
//判断访问终端
var browser={
    versions:function(){
        var u = navigator.userAgent, app = navigator.appVersion;
        return {
            trident: u.indexOf('Trident') > -1, //IE内核
            presto: u.indexOf('Presto') > -1, //opera内核
            webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
            gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核
            mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
            android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
            iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
            iPad: u.indexOf('iPad') > -1, //是否iPad
            webApp: u.indexOf('Safari') == -1, //是否web应该程序，没有头部与底部
            weixin: u.indexOf('MicroMessenger') > -1, //是否微信 （2015-01-22新增）
            qq: u.match(/\sQQ/i) == " qq" //是否QQ
        };
    }(),
    language:(navigator.browserLanguage || navigator.language).toLowerCase()
}
$(function(){
	//判断是否移动端
	if(browser.versions.ios){
		//alert("ios终端");
		if(!browser.versions.weixin){
			$("#share_4_text").empty();
		}
	}else if(browser.versions.mobile){
		//window.location.href = "android.apk";
		if(!browser.versions.weixin){
			$("#share_4_text").empty();
		}
	}else if(browser.versions.android){
		//window.location.href = "android.apk";
		if(!browser.versions.weixin){
			$("#share_4_text").empty();
		}
	}else if(browser.versions.iPad){
		//alert("iPad终端");
	}
});
function down_load(){
	if(browser.versions.ios){
		window.location.href = "itms-services://?action=download-manifest&url=https://app.qsng.cn/jiecan/jiecan.plist";
	}else if(browser.versions.mobile){
		window.location.href = "android.apk";
	}else if(browser.versions.android){
		window.location.href = "android.apk";
	}else if(browser.versions.iPad){
		
	}
}
</script>